﻿@model ExportPreviewNewsletterSubscriptionModel

@{
	var parentModel = ViewData["Parent"] as ExportPreviewModel;
}

<datagrid id="newslettersubscription-preview-grid" 
		allow-resize="true" 
		allow-column-reordering="true" 
		allow-row-selection="true" 
		preserve-grid-state="true">
	<datasource read="@Url.Action("PreviewList", new { id = parentModel.Id })" />
	<paging position="Bottom" show-size-chooser="true" />
	<toolbar>
        <button datagrid-action="DataGridToolAction.ReactToSelection" type="button" id="ExportSelected" class="btn btn-primary btn-flat">
			<i class="far fa-upload"></i>
			<span>@T("Admin.Common.ExportSelected")</span>
        </button>
        <button type="button" id="ExportAll" class="btn btn-primary btn-flat" v-bind:class="{ disabled: grid.rows.length == 0 }">
			<i class="far fa-upload"></i>
			<span>@T("Admin.Common.ExportAll")</span>
        </button>
	</toolbar>
	<columns>
		<column for="Id" halign="center" type="string" />
		<column for="Email" hideable="false" />
		<column for="Active" halign="center" />
		<column for="StoreName" />
		<column for="CreatedOn" />
	</columns>
</datagrid>